package app.fugema.shop.main.home.model;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;

import com.base.common.view.adapter.bean.ChildBaseBean;
import app.fugema.shop.BR;

import java.math.BigDecimal;
import java.util.List;

public class GoodsDetailBean {

    /**
     * code : 0
     * msg : 成功
     * data : {"shopId":1,"shopName":null,"prodId":77,"prodName":"测试商品C","price":50,"content":"<p>CCCC<\/p>","oriPrice":60,"totalStocks":50,"brief":"CCC","pic":"http://img-test.gz-yami.com/2019/05/1bdd097dbffd477799a7aca949377b20.jpg","imgs":"http://img-test.gz-yami.com/2019/05/1bdd097dbffd477799a7aca949377b20.jpg","categoryId":95,"skuList":[{"skuId":404,"price":50,"stocks":50,"skuName":"","pic":null,"properties":""}],"transport":{"transportId":47,"transName":"包邮","createTime":"2018-11-21 17:17:07","shopId":1,"chargeType":0,"isFreeFee":1,"hasFreeCondition":0,"transfeeFrees":[],"transfees":[{"transfeeId":115,"transportId":47,"continuousPiece":1,"firstPiece":1,"continuousFee":0,"firstFee":0,"cityList":[]}]}}
     */

    private int code;
    private String msg;
    private DataBean data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean extends BaseObservable {
        /**
         * shopId : 1
         * shopName : null
         * prodId : 77
         * prodName : 测试商品C
         * price : 50
         * content : <p>CCCC</p>
         * oriPrice : 60
         * totalStocks : 50
         * brief : CCC
         * pic : http://img-test.gz-yami.com/2019/05/1bdd097dbffd477799a7aca949377b20.jpg
         * imgs : http://img-test.gz-yami.com/2019/05/1bdd097dbffd477799a7aca949377b20.jpg
         * categoryId : 95
         * skuList : [{"skuId":404,"price":50,"stocks":50,"skuName":"","pic":null,"properties":""}]
         * transport : {"transportId":47,"transName":"包邮","createTime":"2018-11-21 17:17:07","shopId":1,"chargeType":0,"isFreeFee":1,"hasFreeCondition":0,"transfeeFrees":[],"transfees":[{"transfeeId":115,"transportId":47,"continuousPiece":1,"firstPiece":1,"continuousFee":0,"firstFee":0,"cityList":[]}]}
         */

        private int shopId;
        private Object shopName;
        private int prodId;
        private String prodName;
        private BigDecimal price;
        private BigDecimal oriPrice;
        private String brief; //简要描述,卖点等
        private String pic;//商品主图
        private List<SkuListBean> skuList;//规格
        private int payCount = 1;//数量  自定义添加

        private int saleCount;//已销售数量F


        private String content;//详细描述
        private int totalStocks;
        private TransportBean transport;
        private int categoryId;
        private String imgs;//商品图片列表，以逗号分割


        @Bindable
        public int getPayCount() {
            return payCount;
        }

        public void setPayCount(int payCount) {
            this.payCount = payCount;
            notifyPropertyChanged(BR.payCount);
        }


        public int getSaleCount() {
            return saleCount;
        }

        public void setSaleCount(int saleCount) {
            this.saleCount = saleCount;
        }

        public int getShopId() {
            return shopId;
        }

        public void setShopId(int shopId) {
            this.shopId = shopId;
        }

        public Object getShopName() {
            return shopName;
        }

        public void setShopName(Object shopName) {
            this.shopName = shopName;
        }

        public int getProdId() {
            return prodId;
        }

        public void setProdId(int prodId) {
            this.prodId = prodId;
        }

        public String getProdName() {
            return prodName;
        }

        public void setProdName(String prodName) {
            this.prodName = prodName;
        }

        public BigDecimal getPrice() {
            return price;
        }

        public void setPrice(BigDecimal price) {
            this.price = price;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public BigDecimal getOriPrice() {
            return oriPrice;
        }

        public void setOriPrice(BigDecimal oriPrice) {
            this.oriPrice = oriPrice;
        }

        public int getTotalStocks() {
            return totalStocks;
        }

        public void setTotalStocks(int totalStocks) {
            this.totalStocks = totalStocks;
        }

        public String getBrief() {
            return brief;
        }

        public void setBrief(String brief) {
            this.brief = brief;
        }

        public String getPic() {
            return pic;
        }

        public void setPic(String pic) {
            this.pic = pic;
        }

        public String getImgs() {
            return imgs;
        }

        public void setImgs(String imgs) {
            this.imgs = imgs;
        }

        public int getCategoryId() {
            return categoryId;
        }

        public void setCategoryId(int categoryId) {
            this.categoryId = categoryId;
        }

        public TransportBean getTransport() {
            return transport;
        }

        public void setTransport(TransportBean transport) {
            this.transport = transport;
        }

        public List<SkuListBean> getSkuList() {
            return skuList;
        }

        public void setSkuList(List<SkuListBean> skuList) {
            this.skuList = skuList;
        }

        public static class TransportBean {
            /**
             * transportId : 47
             * transName : 包邮
             * createTime : 2018-11-21 17:17:07
             * shopId : 1
             * chargeType : 0
             * isFreeFee : 1
             * hasFreeCondition : 0
             * transfeeFrees : []
             * transfees : [{"transfeeId":115,"transportId":47,"continuousPiece":1,"firstPiece":1,"continuousFee":0,"firstFee":0,"cityList":[]}]
             */

            private int transportId;
            private String transName;
            private String createTime;
            private int shopId;
            private int chargeType;
            private int isFreeFee;
            private int hasFreeCondition;
            private List<?> transfeeFrees;
            private List<TransfeesBean> transfees;

            public int getTransportId() {
                return transportId;
            }

            public void setTransportId(int transportId) {
                this.transportId = transportId;
            }

            public String getTransName() {
                return transName;
            }

            public void setTransName(String transName) {
                this.transName = transName;
            }

            public String getCreateTime() {
                return createTime;
            }

            public void setCreateTime(String createTime) {
                this.createTime = createTime;
            }

            public int getShopId() {
                return shopId;
            }

            public void setShopId(int shopId) {
                this.shopId = shopId;
            }

            public int getChargeType() {
                return chargeType;
            }

            public void setChargeType(int chargeType) {
                this.chargeType = chargeType;
            }

            public int getIsFreeFee() {
                return isFreeFee;
            }

            public void setIsFreeFee(int isFreeFee) {
                this.isFreeFee = isFreeFee;
            }

            public int getHasFreeCondition() {
                return hasFreeCondition;
            }

            public void setHasFreeCondition(int hasFreeCondition) {
                this.hasFreeCondition = hasFreeCondition;
            }

            public List<?> getTransfeeFrees() {
                return transfeeFrees;
            }

            public void setTransfeeFrees(List<?> transfeeFrees) {
                this.transfeeFrees = transfeeFrees;
            }

            public List<TransfeesBean> getTransfees() {
                return transfees;
            }

            public void setTransfees(List<TransfeesBean> transfees) {
                this.transfees = transfees;
            }

            public static class TransfeesBean {
                /**
                 * transfeeId : 115
                 * transportId : 47
                 * continuousPiece : 1
                 * firstPiece : 1
                 * continuousFee : 0
                 * firstFee : 0
                 * cityList : []
                 */

                private int transfeeId;
                private int transportId;
                private int continuousPiece;
                private int firstPiece;
                private int continuousFee;
                private int firstFee;
                private List<?> cityList;

                public int getTransfeeId() {
                    return transfeeId;
                }

                public void setTransfeeId(int transfeeId) {
                    this.transfeeId = transfeeId;
                }

                public int getTransportId() {
                    return transportId;
                }

                public void setTransportId(int transportId) {
                    this.transportId = transportId;
                }

                public int getContinuousPiece() {
                    return continuousPiece;
                }

                public void setContinuousPiece(int continuousPiece) {
                    this.continuousPiece = continuousPiece;
                }

                public int getFirstPiece() {
                    return firstPiece;
                }

                public void setFirstPiece(int firstPiece) {
                    this.firstPiece = firstPiece;
                }

                public int getContinuousFee() {
                    return continuousFee;
                }

                public void setContinuousFee(int continuousFee) {
                    this.continuousFee = continuousFee;
                }

                public int getFirstFee() {
                    return firstFee;
                }

                public void setFirstFee(int firstFee) {
                    this.firstFee = firstFee;
                }

                public List<?> getCityList() {
                    return cityList;
                }

                public void setCityList(List<?> cityList) {
                    this.cityList = cityList;
                }
            }
        }

        public static class SkuListBean extends ChildBaseBean {
            /**
             * skuId : 404
             * price : 50
             * stocks : 50
             * skuName :
             * pic : null
             * properties :
             */

            private int skuId;
            private BigDecimal price; //价格
            private int stocks;  //库存(-1表示无穷)
            private String skuName;
            private Object pic;//图片
            private String properties;



            public int getSkuId() {
                return skuId;
            }

            public void setSkuId(int skuId) {
                this.skuId = skuId;
            }

            public BigDecimal getPrice() {
                return price;
            }

            public void setPrice(BigDecimal price) {
                this.price = price;
            }

            public int getStocks() {
                return stocks;
            }

            public void setStocks(int stocks) {
                this.stocks = stocks;
            }

            public String getSkuName() {
                return skuName;
            }

            public void setSkuName(String skuName) {
                this.skuName = skuName;
            }

            public Object getPic() {
                return pic;
            }

            public void setPic(Object pic) {
                this.pic = pic;
            }

            public String getProperties() {
                return properties;
            }

            public void setProperties(String properties) {
                this.properties = properties;
            }
        }
    }
}
